<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height">
    <div class="flex-box border-hover-style">
      <div class="Showroom-parent" v-if="props.info.digitalShowroom">
        <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
      </div>
      <img class="outline-parent-bg" :src="publicUrls + 'free/style16/Level2outlineStyle2Bg.webp'" alt="" />
      <div class="outline">
        <div class="outline-content">
          <div class="content-box-right">
            {{ props.info.text }}
          </div>
          <div class="outline-subTitle" v-if="props.info.subTitle">
            <span class="line"></span>{{ props.info.subTitle }}
          </div>
          <TextMax
            v-if="props.domShow"
            :data="props.info.remarks"
            :title="props.info.text"
            :infoData="props.info"
            :row="props.info.value ? 8 : 12"
          ></TextMax>
          <div class="cover" v-if="props.info.value">
            <img
              class="outline-cover"
              @click="ImgVisible = true"
              :src="urls + props.info.value + '?imageView2/3/format/webp'"
              alt=""
            />
          </div>
        </div>
      </div>
    </div>
    <img class="shadow" :src="publicUrls + 'free/style4/firstLevelOutline2Shadow.webp'" alt="" />
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free16Style2',
});
</script>

<script setup lang="ts">
import { publicUrls, textType } from '@/utils/minxin';
import textMode from '../../../textMode/textMode.vue';
import { urls } from '@/utils/request/upload';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style16.vue';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-left: 80px;
  margin-right: 90px;
  .shadow {
    width: 660px;
    height: 234px;
    position: absolute;
    bottom: 0;
    left: 0;
  }
}
.flex-box {
  width: 500px;
  height: 774px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.outline-parent-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
}
.outline {
  z-index: 20;
  width: 100%;
  height: 100%;
  padding: 71px 94px 71px 86px;
}
.outline-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
}

.content-box-right {
  width: 328px;
  height: 80px;
  color: #8a7a6a;
  text-align: center;
  font-family: 'SourceHanSerifCN-Bold';
  font-size: 24px;
  line-height: 36px;
  background: url(https://static.jiyi.show/free/style16/Level2outlineStyle2TitleBg.webp) no-repeat
    center/100% 100%;
  margin-bottom: 8px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
}
.outline-subTitle {
  width: 100%;
  color: #8a7a6a;
  text-align: center;
  font-family: 'SourceHanSerifCN';
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  margin-bottom: 16px;
  .line {
    width: 30px;
    height: 1.5px;
    background: #8a7a6a;
    display: inline-block;
    margin-bottom: 5px;
    margin-right: 2px;
  }
}
.cover {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #d9d9d9;
  &:hover img {
    transform: scale(1.2);
  }
  .outline-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
  }
}

::v-deep .textMore-box {
  margin-bottom: 16px;
  height: 100%;
  display: flex;
  align-items: center;
}
.Showroom-parent {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 21;
}
::v-deep .van-text-ellipsis {
  font-family: PingFang SC !important;
  font-size: 16px !important;
  color: #333 !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: #333 !important;
  font-weight: 800 !important;
}
</style>